import Vue from 'vue'
import _ from "lodash"
import ExTableAuto from './haigui-ex/ex-table-auto'
import ExTableMem from './haigui-ex/ex-table-mem'
import ExDialogForm from './haigui-ex/ex-dialog-form'
import ExButtonDelete from './haigui-ex/ex-button-delete'

import ExUploadFile from './haigui-ex/ex-upload-file'
import ExUploadImg from './haigui-ex/ex-upload-img'

import ExSelectAuto from './haigui-ex/ex-select-auto'



import ExCascader from './haigui-ex/ex-cascader/index.js'
import ExExportForm from './haigui-ex/ex-export-form.vue'
import ExFieldsetTitle from './haigui-ex/ex-fieldset-title.vue'
import FolderElUploader from './haigui-ex/ex-upload/index.js'
import ExSortTable from './haigui-ex/ex-sort-table/sort-table.vue'

import ExHtmlEditor from './haigui-ex/ex-html-editor.vue'

// import ExAddress from './haigui-ex/ex-address.vue'


import ExCalendar from './haigui-ex/ex-calendar/calendar.vue'

// 文本填充
import ExTextFill from './haigui-ex/ex-text-fill.vue'
// 弹框
import ExModal from './haigui-ex/ex-modal.vue'
// 文本自动省略
import ExAutoTooltip from './haigui-ex/ex-auto-tooltip.vue'
// 日期自动填充 value-format 参数
import ExDatePicker from './haigui-ex/ex-date-picker.vue'
// 文件上传
import ExUpload from './haigui-ex/ex-upload.vue'
// 文件预览
import ExViewer from './haigui-ex/ex-viewer.vue'

// ------------

import Ajax from './haigui-ex/ex-ajax/index.js'

import CommonUtil from './lib/common-util.js'


import SuperTablePage from './extend/super-table-page.vue'

import SuperTable from './extend/super-table.vue'
import SuperDesc from './extend/super-desc.vue'
import SuperForm from './extend/super-form.vue'
import SuperInput from './extend/super-input.vue'
import SelectAuto from './extend/select_auto.vue'
import RadioGroupAuto from './extend/radio_group_auto.vue'
import CheckboxGroupAuto from './extend/checkbox_group_auto.vue'

import ConfirmButton from './extend/confirm-button.vue'
import DialogForm from './extend/dialog-form.vue'
import CombinedSelectInput from "./extend/combined-select-input.vue"
import HeaderSpiler from "./extend/header-spiler"
import BottomTipItem from "./extend/bottom-tip-item"
import DropdownAuto from "./extend/dropdown_auto"
import ExImageView from "./extend/ex_image_view"
import ExCheckboxYN from "./extend/checkbox-yn"
import SuperUpload from "./extend/super-upload"

// import 'element-ui/lib/theme-chalk/index.css';
import './haigui-ex-ui.css'
// import AFTableColumn from 'af-table-column'

const install = function (Vue) {

    
    // Vue.use(AFTableColumn)
    Vue.component('ex-table-auto', ExTableAuto)
    Vue.component('ex-table-mem', ExTableMem)
    Vue.component('ex-dialog-form', ExDialogForm)
    Vue.component('ex-button-delete', ExButtonDelete)

    Vue.component('ex-select-auto', ExSelectAuto)
    Vue.component('ex-cascader', ExCascader)
    Vue.component('ex-export-form', ExExportForm)

    Vue.component('ex-field-title', ExFieldsetTitle)
    Vue.component('field-title', ExFieldsetTitle)

    Vue.component('ex-uploader', FolderElUploader)

    Vue.component('ex-sort-table', ExSortTable)

    Vue.component('ex-upload-file', ExUploadFile)
    Vue.component('ex-upload-img', ExUploadImg)

    Vue.component('ex-html-editor', ExHtmlEditor)

    Vue.component('ex-calendar', ExCalendar)

    Vue.component('ex-address', () => import('./haigui-ex/ex-address.vue'))

    // 文本填充
    Vue.prototype.$textFill = '--'
    Vue.component('ex-text-fill', ExTextFill)
    Vue.component('ex-modal', ExModal)
    Vue.component('ex-auto-tooltip', ExAutoTooltip)
    Vue.component('ex-date-picker', ExDatePicker)
    // 文件夹上传
    Vue.component('ex-upload', ExUpload)
    Vue.component('ex-viewer', ExViewer)



    Vue.component('ex_super_table_page', SuperTablePage)
    Vue.component('ex_super_table', SuperTable)
    Vue.component('ex_super_desc', SuperDesc)
    Vue.component('ex_super_form', SuperForm)
    Vue.component('ex_super_input', SuperInput)
    Vue.component('ex_select_auto', SelectAuto)
    Vue.component('ex_radio_group_auto', RadioGroupAuto)
    Vue.component('ex_checkbox_group_auto', CheckboxGroupAuto)


    Vue.component('ex-confirm-button', ConfirmButton)
    Vue.component('ex_super_dialog_form', DialogForm)
    Vue.component('ex-combined-select-input', CombinedSelectInput)
    Vue.component('ex_header_spiler', HeaderSpiler)
    Vue.component('ex_bottom_tip_item', BottomTipItem)
    Vue.component('ex_dropdown_auto', DropdownAuto)
    Vue.component('ex_image_view', ExImageView)
    Vue.component('ex_checkbox_yn', ExCheckboxYN)
    Vue.component('ex_super_upload', SuperUpload)


    Ajax(Vue)
    CommonUtil(Vue)
}

export default {
    install
}
